\(\int \frac {1+x^2}{1-2 x^2+x^4} \, dx\) [76]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 11 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=\frac {x}{1-x^2} \]

[Out]

x/(-x^2+1)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {28, 391} \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=\frac {x}{1-x^2} \]

[In]

Int[(1 + x^2)/(1 - 2*x^2 + x^4),x]

[Out]

x/(1 - x^2)

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 391

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*x*((a + b*x^n)^(p + 1)/a), x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a*d - b*c*(n*(p + 1) + 1), 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1+x^2}{\left (-1+x^2\right )^2} \, dx \\ & = \frac {x}{1-x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=-\frac {x}{-1+x^2} \]

[In]

Integrate[(1 + x^2)/(1 - 2*x^2 + x^4),x]

[Out]

-(x/(-1 + x^2))

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00

method result size
gosper \(-\frac {x}{x^{2}-1}\) \(11\)
norman \(-\frac {x}{x^{2}-1}\) \(11\)
risch \(-\frac {x}{x^{2}-1}\) \(11\)
parallelrisch \(-\frac {x}{x^{2}-1}\) \(11\)
default \(-\frac {1}{2 \left (x +1\right )}-\frac {1}{2 \left (x -1\right )}\) \(16\)

[In]

int((x^2+1)/(x^4-2*x^2+1),x,method=_RETURNVERBOSE)

[Out]

-x/(x^2-1)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=-\frac {x}{x^{2} - 1} \]

[In]

integrate((x^2+1)/(x^4-2*x^2+1),x, algorithm="fricas")

[Out]

-x/(x^2 - 1)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.64 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=- \frac {x}{x^{2} - 1} \]

[In]

integrate((x**2+1)/(x**4-2*x**2+1),x)

[Out]

-x/(x**2 - 1)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=-\frac {x}{x^{2} - 1} \]

[In]

integrate((x^2+1)/(x^4-2*x^2+1),x, algorithm="maxima")

[Out]

-x/(x^2 - 1)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=-\frac {1}{x - \frac {1}{x}} \]

[In]

integrate((x^2+1)/(x^4-2*x^2+1),x, algorithm="giac")

[Out]

-1/(x - 1/x)

Mupad [B] (verification not implemented)

Time = 13.36 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \frac {1+x^2}{1-2 x^2+x^4} \, dx=-\frac {x}{x^2-1} \]

[In]

int((x^2 + 1)/(x^4 - 2*x^2 + 1),x)

[Out]

-x/(x^2 - 1)